from django.urls import path, reverse
from .views import *
from .views_tasks import TasksListView, TasksCreateView, TasksDeleteView, TasksUpdateView

app_name = "datapanel"

urlpatterns = [
    path("", ProductsFilterView.as_view(), name="products_filter"),
    path("products/", ProductsFilterView.as_view(), name="products_filter"),
    path("products/<int:pk>/", ProductsDetailView.as_view(),
         name="products_detail"),
    path("products/tocsv/", tocsv, name="tocsv"),
    path("products/list/", ProductsListView.as_view(), name="products_list"),
    path("products/graph/", products_graph, name="products_graph"),
    path("chart/seller/", chart_seller, name="chart_seller"),
    path("tasks/", TasksListView.as_view(), name="tasks_list"),
    path("tasks/create/", TasksCreateView.as_view(), name="tasks_create"),
    path("tasks/delete/<int:pk>/", TasksDeleteView.as_view(), name="tasks_delete"),
    path('tasks/update/<int:pk>/', TasksUpdateView.as_view(), name='tasks_update'),
    path('login/', signin, name='login'),
    path('logout/', signout, name='logout'),
]
